<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			window.onload=function(){
				var btn=document.getElementById("btn");
				btn.onclick=function(event){
					//方法一：
					if(!event){
						event=window.event;   //如果浏览器没有event，则调用window.event
					}
					//方法二：event=event||window.event;
					alert("altKey："+event.altKey
			 		 +"\nshiftKey："+event.shiftKey
			 		 +"\nctrlKey："+event.ctrlKey);
				}			
			}
		</script>
	</head>
	<body>
		<input id="btn" type="button" value="点击"/>
	</body>
</html>
